package com.java.gobang;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @author Zhang Guangyong
 * @desacription 测试五子棋
 * @date 2019年07月15日 11:38
 */
public class Gobang {

    private static int BORDER_SIZE = 15;

    private static String[][] border;

    public void init() {

        border = new String[BORDER_SIZE][BORDER_SIZE];

        for (int i = 0; i < BORDER_SIZE; i++) {
            for (int j = 0; j < BORDER_SIZE; j++) {
                border[i][j] = "+";
            }
        }
    }

    public void print() {
        for (int i = 0; i < BORDER_SIZE; i++) {
            for (int j = 0; j < BORDER_SIZE; j++) {
                System.out.print(border[i][j] + " ");
            }
            System.out.print("\n");
        }
    }

    public void setPoint(int x, int y) {
        border[x - 1][y - 1] = "●";
    }

    public static void main(String[] args) throws IOException {
        Gobang border = new Gobang();
        border.init();
        border.print();

        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        String inputStr = null;

        while ((inputStr = bufferedReader.readLine()) != null) {

            String[] posStrArr = inputStr.split(",");

            int x = Integer.parseInt(posStrArr[0]);
            int y = Integer.parseInt(posStrArr[1]);

            border.setPoint(x, y);
            border.print();


        }


    }
}
